package com.czxy.demo01;

import java.util.ArrayList;

public class Test13 {
    public static void main(String[] args) {
        ArrayList<Employee> list = new ArrayList<>();
        list.add(new Employee("小明",1800));
        list.add(new Employee("小新",2600));

        for (Employee employee : list) {
            if(employee.getName().equals("小明")){
                employee.setSalary(employee.getSalary()+300);
            }

            System.out.println(employee.getName()+" - - - "+employee.getSalary());
        }

    }
}
